home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / QDOffscreen.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  7.4 KB  |  430 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QDOffscreen.a
  3. ;
  4. ;    Contains:    QuickDraw Offscreen GWorld Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  21. __QDOFFSCREEN__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  25.     include 'Errors.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'Types.a'                                            ;
  33. ;        include 'MixedMode.a'                                        ;
  34. ;        include 'QuickdrawText.a'                                    ;
  35.  
  36. pixPurgeBit                        EQU        0
  37. noNewDeviceBit                    EQU        1
  38. useTempMemBit                    EQU        2
  39. keepLocalBit                    EQU        3
  40. pixelsPurgeableBit                EQU        6
  41. pixelsLockedBit                    EQU        7
  42. mapPixBit                        EQU        16
  43. newDepthBit                        EQU        17
  44. alignPixBit                        EQU        18
  45. newRowBytesBit                    EQU        19
  46. reallocPixBit                    EQU        20
  47. clipPixBit                        EQU        28
  48. stretchPixBit                    EQU        29
  49. ditherPixBit                    EQU        30
  50. gwFlagErrBit                    EQU        31
  51.  
  52. pixPurge                        EQU        1 << pixPurgeBit
  53. noNewDevice                        EQU        1 << noNewDeviceBit
  54. useTempMem                        EQU        1 << useTempMemBit
  55. keepLocal                        EQU        1 << keepLocalBit
  56. pixelsPurgeable                    EQU        1 << pixelsPurgeableBit
  57. pixelsLocked                    EQU        1 << pixelsLockedBit
  58. mapPix                            EQU        1 << mapPixBit
  59. newDepth                        EQU        1 << newDepthBit
  60. alignPix                        EQU        1 << alignPixBit
  61. newRowBytes                        EQU        1 << newRowBytesBit
  62. reallocPix                        EQU        1 << reallocPixBit
  63. clipPix                            EQU        1 << clipPixBit
  64. stretchPix                        EQU        1 << stretchPixBit
  65. ditherPix                        EQU        1 << ditherPixBit
  66. gwFlagErr                        EQU        1 << gwFlagErrBit
  67.  
  68. ; typedef unsigned long     GWorldFlags
  69. ; Type definition of a GWorldPtr 
  70. ; typedef CGrafPtr             GWorldPtr
  71. ;
  72. ; pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld, short PixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  73. ;
  74.     IF ¬ GENERATINGCFM THEN
  75.         Macro
  76.         _NewGWorld
  77.             dc.w     $203C
  78.             dc.w     $0016
  79.             dc.w     $0000
  80.             dc.w     $AB1D
  81.         EndM
  82.     ELSE
  83.         IMPORT_CFM_FUNCTION    NewGWorld
  84.     ENDIF
  85.  
  86. ;
  87. ; pascal Boolean LockPixels(PixMapHandle pm)
  88. ;
  89.     IF ¬ GENERATINGCFM THEN
  90.         Macro
  91.         _LockPixels
  92.             dc.w     $203C
  93.             dc.w     $0004
  94.             dc.w     $0001
  95.             dc.w     $AB1D
  96.         EndM
  97.     ELSE
  98.         IMPORT_CFM_FUNCTION    LockPixels
  99.     ENDIF
  100.  
  101. ;
  102. ; pascal void UnlockPixels(PixMapHandle pm)
  103. ;
  104.     IF ¬ GENERATINGCFM THEN
  105.         Macro
  106.         _UnlockPixels
  107.             dc.w     $203C
  108.             dc.w     $0004
  109.             dc.w     $0002
  110.             dc.w     $AB1D
  111.         EndM
  112.     ELSE
  113.         IMPORT_CFM_FUNCTION    UnlockPixels
  114.     ENDIF
  115.  
  116. ;
  117. ; pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld, short pixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  118. ;
  119.     IF ¬ GENERATINGCFM THEN
  120.         Macro
  121.         _UpdateGWorld
  122.             dc.w     $203C
  123.             dc.w     $0016
  124.             dc.w     $0003
  125.             dc.w     $AB1D
  126.         EndM
  127.     ELSE
  128.         IMPORT_CFM_FUNCTION    UpdateGWorld
  129.     ENDIF
  130.  
  131. ;
  132. ; pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  133. ;
  134.     IF ¬ GENERATINGCFM THEN
  135.         Macro
  136.         _DisposeGWorld
  137.             dc.w     $203C
  138.             dc.w     $0004
  139.             dc.w     $0004
  140.             dc.w     $AB1D
  141.         EndM
  142.     ELSE
  143.         IMPORT_CFM_FUNCTION    DisposeGWorld
  144.     ENDIF
  145.  
  146. ;
  147. ; pascal void GetGWorld(CGrafPtr *port, GDHandle *gdh)
  148. ;
  149.     IF ¬ GENERATINGCFM THEN
  150.         Macro
  151.         _GetGWorld
  152.             dc.w     $203C
  153.             dc.w     $0008
  154.             dc.w     $0005
  155.             dc.w     $AB1D
  156.         EndM
  157.     ELSE
  158.         IMPORT_CFM_FUNCTION    GetGWorld
  159.     ENDIF
  160.  
  161. ;
  162. ; pascal void SetGWorld(CGrafPtr port, GDHandle gdh)
  163. ;
  164.     IF ¬ GENERATINGCFM THEN
  165.         Macro
  166.         _SetGWorld
  167.             dc.w     $203C
  168.             dc.w     $0008
  169.             dc.w     $0006
  170.             dc.w     $AB1D
  171.         EndM
  172.     ELSE
  173.         IMPORT_CFM_FUNCTION    SetGWorld
  174.     ENDIF
  175.  
  176. ;
  177. ; pascal void CTabChanged(CTabHandle ctab)
  178. ;
  179.     IF ¬ GENERATINGCFM THEN
  180.         Macro
  181.         _CTabChanged
  182.             dc.w     $203C
  183.             dc.w     $0004
  184.             dc.w     $0007
  185.             dc.w     $AB1D
  186.         EndM
  187.     ELSE
  188.         IMPORT_CFM_FUNCTION    CTabChanged
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal void PixPatChanged(PixPatHandle ppat)
  193. ;
  194.     IF ¬ GENERATINGCFM THEN
  195.         Macro
  196.         _PixPatChanged
  197.             dc.w     $203C
  198.             dc.w     $0004
  199.             dc.w     $0008
  200.             dc.w     $AB1D
  201.         EndM
  202.     ELSE
  203.         IMPORT_CFM_FUNCTION    PixPatChanged
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal void PortChanged(GrafPtr port)
  208. ;
  209.     IF ¬ GENERATINGCFM THEN
  210.         Macro
  211.         _PortChanged
  212.             dc.w     $203C
  213.             dc.w     $0004
  214.             dc.w     $0009
  215.             dc.w     $AB1D
  216.         EndM
  217.     ELSE
  218.         IMPORT_CFM_FUNCTION    PortChanged
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal void GDeviceChanged(GDHandle gdh)
  223. ;
  224.     IF ¬ GENERATINGCFM THEN
  225.         Macro
  226.         _GDeviceChanged
  227.             dc.w     $203C
  228.             dc.w     $0004
  229.             dc.w     $000A
  230.             dc.w     $AB1D
  231.         EndM
  232.     ELSE
  233.         IMPORT_CFM_FUNCTION    GDeviceChanged
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void AllowPurgePixels(PixMapHandle pm)
  238. ;
  239.     IF ¬ GENERATINGCFM THEN
  240.         Macro
  241.         _AllowPurgePixels
  242.             dc.w     $203C
  243.             dc.w     $0004
  244.             dc.w     $000B
  245.             dc.w     $AB1D
  246.         EndM
  247.     ELSE
  248.         IMPORT_CFM_FUNCTION    AllowPurgePixels
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal void NoPurgePixels(PixMapHandle pm)
  253. ;
  254.     IF ¬ GENERATINGCFM THEN
  255.         Macro
  256.         _NoPurgePixels
  257.             dc.w     $203C
  258.             dc.w     $0004
  259.             dc.w     $000C
  260.             dc.w     $AB1D
  261.         EndM
  262.     ELSE
  263.         IMPORT_CFM_FUNCTION    NoPurgePixels
  264.     ENDIF
  265.  
  266. ;
  267. ; pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  268. ;
  269.     IF ¬ GENERATINGCFM THEN
  270.         Macro
  271.         _GetPixelsState
  272.             dc.w     $203C
  273.             dc.w     $0004
  274.             dc.w     $000D
  275.             dc.w     $AB1D
  276.         EndM
  277.     ELSE
  278.         IMPORT_CFM_FUNCTION    GetPixelsState
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal void SetPixelsState(PixMapHandle pm, GWorldFlags state)
  283. ;
  284.     IF ¬ GENERATINGCFM THEN
  285.         Macro
  286.         _SetPixelsState
  287.             dc.w     $203C
  288.             dc.w     $0008
  289.             dc.w     $000E
  290.             dc.w     $AB1D
  291.         EndM
  292.     ELSE
  293.         IMPORT_CFM_FUNCTION    SetPixelsState
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  298. ;
  299.     IF ¬ GENERATINGCFM THEN
  300.         Macro
  301.         _GetPixBaseAddr
  302.             dc.w     $203C
  303.             dc.w     $0004
  304.             dc.w     $000F
  305.             dc.w     $AB1D
  306.         EndM
  307.     ELSE
  308.         IMPORT_CFM_FUNCTION    GetPixBaseAddr
  309.     ENDIF
  310.  
  311. ;
  312. ; pascal QDErr NewScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  313. ;
  314.     IF ¬ GENERATINGCFM THEN
  315.         Macro
  316.         _NewScreenBuffer
  317.             dc.w     $203C
  318.             dc.w     $000E
  319.             dc.w     $0010
  320.             dc.w     $AB1D
  321.         EndM
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION    NewScreenBuffer
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  328. ;
  329.     IF ¬ GENERATINGCFM THEN
  330.         Macro
  331.         _DisposeScreenBuffer
  332.             dc.w     $203C
  333.             dc.w     $0004
  334.             dc.w     $0011
  335.             dc.w     $AB1D
  336.         EndM
  337.     ELSE
  338.         IMPORT_CFM_FUNCTION    DisposeScreenBuffer
  339.     ENDIF
  340.  
  341. ;
  342. ; pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  343. ;
  344.     IF ¬ GENERATINGCFM THEN
  345.         Macro
  346.         _GetGWorldDevice
  347.             dc.w     $203C
  348.             dc.w     $0004
  349.             dc.w     $0012
  350.             dc.w     $AB1D
  351.         EndM
  352.     ELSE
  353.         IMPORT_CFM_FUNCTION    GetGWorldDevice
  354.     ENDIF
  355.  
  356. ;
  357. ; pascal Boolean QDDone(GrafPtr port)
  358. ;
  359.     IF ¬ GENERATINGCFM THEN
  360.         Macro
  361.         _QDDone
  362.             dc.w     $203C
  363.             dc.w     $0004
  364.             dc.w     $0013
  365.             dc.w     $AB1D
  366.         EndM
  367.     ELSE
  368.         IMPORT_CFM_FUNCTION    QDDone
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal long OffscreenVersion(void)
  373. ;
  374.     IF ¬ GENERATINGCFM THEN
  375.         Macro
  376.         _OffscreenVersion
  377.             moveq    #20,d0
  378.             dc.w     $AB1D
  379.         EndM
  380.     ELSE
  381.         IMPORT_CFM_FUNCTION    OffscreenVersion
  382.     ENDIF
  383.  
  384. ;
  385. ; pascal QDErr NewTempScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  386. ;
  387.     IF ¬ GENERATINGCFM THEN
  388.         Macro
  389.         _NewTempScreenBuffer
  390.             dc.w     $203C
  391.             dc.w     $000E
  392.             dc.w     $0015
  393.             dc.w     $AB1D
  394.         EndM
  395.     ELSE
  396.         IMPORT_CFM_FUNCTION    NewTempScreenBuffer
  397.     ENDIF
  398.  
  399. ;
  400. ; pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  401. ;
  402.     IF ¬ GENERATINGCFM THEN
  403.         Macro
  404.         _PixMap32Bit
  405.             dc.w     $203C
  406.             dc.w     $0004
  407.             dc.w     $0016
  408.             dc.w     $AB1D
  409.         EndM
  410.     ELSE
  411.         IMPORT_CFM_FUNCTION    PixMap32Bit
  412.     ENDIF
  413.  
  414. ;
  415. ; pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  416. ;
  417.     IF ¬ GENERATINGCFM THEN
  418.         Macro
  419.         _GetGWorldPixMap
  420.             dc.w     $203C
  421.             dc.w     $0004
  422.             dc.w     $0017
  423.             dc.w     $AB1D
  424.         EndM
  425.     ELSE
  426.         IMPORT_CFM_FUNCTION    GetGWorldPixMap
  427.     ENDIF
  428.  
  429.     ENDIF ; __QDOFFSCREEN__
  430.